import React from "react";
  
import { HomeOutlined } from "@ant-design/icons";
const Home = React.lazy(() => import("../views/home"));
const List = React.lazy(() => import("../views/list"));
const Login = React.lazy(() => import("../views/login"));
const My = React.lazy(() => import("../views/my"));
const Register = React.lazy(() => import("../views/register"));
const MainLayout = React.lazy(() => import("../mainLayout"));
const ListAdd = React.lazy(() => import("../views/listAdd"));
const Set = React.lazy(() => import("../views/set"));
const Other = React.lazy(() => import("../views/other"));
export const menu_routes = [
  {
    path: "/",
    element: <Home></Home>,
    meta: {
      label: "首页",
      icon: <HomeOutlined />,
    },
  },
  {
    path: "/list",
    meta: {
      label: "列表操作",
    },
    children: [
      {
        path: "/list/manage",
        element: <List></List>,
        meta: {
          label: "列表管理",
        },
      },
      {
        path: "/list/add",
        element: <ListAdd></ListAdd>,
        meta: {
          label: "列表添加",
        },
      },
    ],
  },
  {
    path: "/my",
    element: <My></My>,
    meta: {
      label: "我的",
    },
  },
  {
    path: "/1231231",
    element: <Other></Other>,
    meta: {
      label: "其他",
    },
  },
  {
    path: "/set",
    element: <Set></Set>,
    meta: {
      label: "设置",
    },
  },
];

export const routes = [
  {
    path: "/",
    element: <MainLayout></MainLayout>,
    children: menu_routes,
  },
  {
    path: "/register",
    element: <Register></Register>,
  },
  {
    path: "/login",
    element: <Login></Login>,
  },
];
